package main

import (
	_ "myerp/routers"
	"time"

	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"
)

func TimetodateInt64(i int64) string {
	tm := time.Unix(i, 0)
	return tm.Format("2006-01-02 15:04:05")
}

func TimetodateInt(i int) string {
	tm := time.Unix(int64(i), 0)
	return tm.Format("2006-01-02 15:04:05")
}

func main() {
	//beego.Controller.GetSession()
	//beego.MaxMemory = 1 << 22
	beego.AddFuncMap("timetodateint64", TimetodateInt64)
	beego.AddFuncMap("timetodateint", TimetodateInt)
	orm.Debug = true
	beego.Run()
}
